<?php
	//开启会话
	session_start();

	//设置字符编码
	header('Conten-Type:text/html; charset=utf-8');
	
	//引入数据库连接文件
	require_once 'PDO_connect.inc.php';
?>

<html>
	<head>
		<title>学生选课系统</title>
		<meta content="text/html;charset=utf-8" http-equiv="Conten-Type">
	</head>
<body>
	<div id="header" align="center">
		<div id="user" style="background-color:#CCCCCC;width:1000px;" align="center" >
			<div id="welcome" style="height:100%;width:500px;float:left;text-align:left;font-size:24px">
				欢迎来到选课系统
			</div>
			<div id="userInfo" style="width:300px;height:100%;float:right;text-align:right;">
<?php
			//判断是否登录
			if (isset($_SESSION['username'])) 
			{
				echo "您以 <span id='user'>{$_SESSION['username']}</span> 登录
				(<a  href='logout.php'> 注销 </a>)&nbsp;&nbsp;
				(<a href='resetpswd.php')>修改密码</a>)";	
			} else 
			{	
				echo "您尚未登录(<a  href='login.php'>登录</a>)&nbsp;\n";
				echo "还没有用户名(<a href='register.php'>注册</a>)\n";
			}
?>
			</div>
        </div>
		<div id="guide" style="width:1000px;text-align:left;">
			<a href="index.php">首页</a>&nbsp;&nbsp;&nbsp;&nbsp;
			<a href="mycourse.php">我的选课</a>
		</div>
		<div id="footer-line" align="center">
			<img alt="" src="images/footer-line.png"/>
		</div>
	</div>